package com.oot2d;

import com.oot2d.states.*;
import com.oot2d.states.Game;
import org.newdawn.slick.*;
import org.newdawn.slick.state.StateBasedGame;

import java.io.File;

public class OoT2D extends StateBasedGame {
    private final static int TITLE = 0;
    private final static int FILE = 1;
    private final static int GAME = 2;
    private final static int CUTSCENE = 3;
    private final static int GAMEOVER = 4;
    private final static int OPTIONS = 5;

    public OoT2D()
    {
        super("OoT2D");

        addState(new Title(TITLE));
        addState(new FileSelect(FILE));
        addState(new Game(GAME));
        addState(new Cutscene(CUTSCENE));
        addState(new GameOver(GAMEOVER));
        addState(new Options(OPTIONS));

        enterState(GAME);
    }

    public void initStatesList(GameContainer gc) throws SlickException
    {
        //What is this even for...?
    }

    public static void main(String[] a) throws SlickException
    {
        System.setProperty("org.lwjgl.librarypath", new File("natives").getAbsolutePath());

        AppGameContainer app = new AppGameContainer(new ScalableGame(new OoT2D(), 480, 320));

        app.setDisplayMode(960, 640, false);
        //app.setDisplayMode(480, 320, false);
        app.setShowFPS(false);


        app.setMaximumLogicUpdateInterval(10);
        /*
        app.setVSync(true);
        app.setTargetFrameRate(60);
        */

        app.start();
    }
}
